import request from '../utils/request';

export default {
    // 上传图片
    uploadImage(filePath) {
        return request.upload('/upload/image', filePath);
    },

    // 上传语音
    uploadVoice(filePath) {
        return request.upload('/upload/audio', filePath);
    },

    // 获取上传凭证
    getUploadToken() {
        return request.get('/upload/token');
    },

    // 检查文件大小和类型
    checkFileValidity(fileInfo) {
        return request.post('/upload/check', fileInfo);
    }
}; 